import 'package:floor/floor.dart';

/// @Author 杨璐铭
/// @Date 2024/12/12 10:10PM
/// @describe 修改完表结构后执行flutter packages pub run build_runner build
@entity
class Video {
  @PrimaryKey(autoGenerate: true)
  final int? id;

  final String createTime;
  final int num;
  final int duration;
  final String fileName;
  final String filePath;
  final String userId;

  Video({
    this.id,
    required this.num,
    required this.duration,
    required this.fileName,
    required this.filePath,
    required this.userId,
    String? createTime,
  }) : createTime = createTime ?? DateTime.now().toString();
}

@entity
class Training {
  @PrimaryKey(autoGenerate: true)
  final int? id;

  final String createTime;
  final String userId;
  final int groupPrefix;
  final int groupSuffix;
  final int times;
  final int seconds;
  final int days;
  final String dailyTraining;

  Training({
    this.id,
    required this.userId,
    required this.groupPrefix,
    required this.groupSuffix,
    required this.times,
    required this.seconds,
    required this.days,
    required this.dailyTraining,
    String? createTime,
  }) : createTime = createTime ?? DateTime.now().toString();
}
